home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / PROGEDIT / 3458B.ZIP / AMAC44B.ZIP / RING13.QM < prev    next >
Text File  |  1992-05-27  |  36KB  |  761 lines

  1. *                             RING13.QM, v1.3b
  2. *             Macros To Select and Load Files In QEdit Ring
  3. *                        Written by Tom Hogshead
  4. *                                 5/30/92
  5. *
  6. *  @2    Select and Load Files From a PickList of All Files In Ring, ( )
  7. *        File Edit Statuses Are Unchanged
  8. *       (Does *NOT* Emulate PC Magazine's FILECTRL.COM after Loading)
  9. *               (Written by Tom Hogshead and John Goodman)
  10. *
  11. *  @3 ²  Select and Load Files From a PickList of All Files In Ring
  12. *
  13. *  @4 ²  Select and Load Files From a DOS "DIR" Picklist, User Inputs
  14. *        File Pattern To Make PickList
  15. *
  16. *  @5 ²  Select and Load Files From a PickList Made Using Directory
  17. *        Extended, DX.EXE, User Selects Desired File Extension and
  18. *        Sort Options From a Pre-Made File "FILE.SRT" To Make PickList
  19. *
  20. *  @6 ²  Select and Load Files From a PickList Made Using Directory
  21. *        Extended, DX.EXE, User Inputs File Pattern and Sorting Options
  22. *        To Make PickList
  23. *
  24. *  @8 ²  Load While Editing All Files In Pre-Made List of Files,
  25. *        Modification of @1
  26. *
  27. *  @9 ²  Begin or Continue Emulation of PC Magazine's FILECTRL.COM
  28. *        After Macros @1 to @7 Have Been Stopped
  29. *
  30. *  @f1   {e:\up\ring@f1}
  31. *        Load Previously Saved List of Files Made With @f2
  32. *       (Does *NOT* Emulate PC Magazine's FILECTRL.COM After Loading)
  33. *
  34. *  @f2   Save List of Files In Ring, Restore With @f1 and/or RING.BAT
  35. *       (Does *NOT* Emulate PC Magazine's FILECTRL.COM after Loading)
  36. *
  37. *                              Other Macros
  38. *                             ==============
  39. *  @F6   Makes Sorted DIR List of File Names in Conventional "8.3" Format
  40. *             NO SPACES, with Date and Time, like this:
  41. *             FILE25.QM       64795   6-23-91   4:12a
  42. *
  43. *  @r    Reset to DefaultWordSet After Macros Complete
  44. *  @h    Jump From Index Line To Locate Macro or Item In Document Below
  45. *  ---------
  46. *     ²  Macro keys with superscript² denotes emulation of FILECTRL.COM
  47. *
  48. *   Misc
  49. *   =====
  50. *   Description
  51. *   Macros
  52. *   locate Macros And Items In File From Index, How To
  53. *   FILECTRL.COM from PC Magazine
  54. *   Directory Extended DX.EXE
  55. *   AMACnn.ZIP
  56. *   Uploaded sources for AMACnn
  57. *   Newkey Macro To Close Windows And Set "DefaultWordSet"
  58. *   RING_TST.QM Tests For Optimum Ring Loop Technique
  59. *   Problems or Suggestions?
  60. *   Version History
  61. *
  62. *-- eoi
  63.  
  64.  
  65. * 
  66. *  (Description)
  67. *  ---------------
  68. *   QEdit macros in RING13.QM emulate PC Magazine's FILECTRL.COM enabling
  69. *   the user to know  what files are in the  ring and in what order,  and
  70. *   give the capability to load a file in the ring  *without*  having  to
  71. *   nextfile through the  ring.  Files may be loaded from a list of files
  72. *   at the  command line or  from a PickList  of files in  the ring while
  73. *   editing.  Directory Extended DX.EXE is required for some macros.
  74.  
  75. *   Comparisons are  made in (RING_TST.QM) of  speed, versatility and the
  76. *   limitations of  different macro techniques to  loop through all files
  77. *   loaded in the ring, perform any  desired function on each file in the
  78. *   ring, and end in the file we started in.
  79. * 
  80. *  (Directory) Extended DX.EXE
  81. *   ----------------------------
  82. *   Directory Extended is the most powerful and versatile file management
  83. *   program I am aware of.  DX.EXE file list function is used  in some of   |
  84. *   these macros to make a file list of files of a specified file pattern
  85. *   sorted by name, date, or extension.  It is available in AMAC-PRG.ZIP,
  86. *   or on BBS's as DX260 or the earlier version DX210.
  87.  
  88. *  (FILECTRL).COM
  89. *   --------------
  90. *   I was impressed by the functionality of PC Magazine's FILECTRL.COM in
  91. *   the  July 1991 issue, v10n13.   It overcomes  one  of the significant
  92. *   deficiencies of *all* file and directory programs I am aware of, what
  93. *   I  call "blind"  lists. The  text file  contents of  the file  can be
  94. *   determined with each cursor down/up  without having to press <enter>.
  95. *   These macros were written to  "partially" emulate this function. It's
  96. *   probably easier for  you to see  how each macro  works rather than me
  97. *   try to describe more  than I have. I have  tried to include enough to
  98. *   get  you started.  Any  questions or  problems,  please let  me know.
  99. * 
  100. *  (AMACnn).ZIP
  101. *   -------------
  102. *   AMACnn.ZIP is a collection of QEdit macros I have put together.  See
  103. *   ALLMACRO.INF and read.me.
  104. * 
  105. *  (Problems) or suggestions?
  106. *   --------------------------
  107. *   Any problems  or suggestion,  I would  like to  hear from  you. I can
  108. *   be reached daily on either  SemWare,  Exec-PC  or  NewWare.   I check
  109. *   CompuServe only once a month. I  will also try to include your useful
  110. *   macros in AMAC  if you send them to me.  Hope you  find some of these
  111. *   macros useful.  I have enjoyed writing them.  Thanks.
  112.  
  113. *   Tom Hogshead
  114.  
  115. *  (Macros)
  116. *
  117. *                            M A C R O S
  118. * ----------------------------------------------------------------------
  119. *  @(2)  Select and Load Files From a PickList of All Files In Ring,
  120. *        File Edit Statuses Are Unchanged
  121. *       (Does *NOT* Emulate PC Magazine's FILECTRL.COM after Loading)
  122. *       (Written by Tom Hogshead and John Goodman)
  123. * ----------------------------------------------------------------------
  124. *   The idea for using a unique character to mark position in the NUL file,
  125. *   initially proposed by Richard Blackburn of SemWare, is used in @2.
  126.  
  127. @2  MacroBegin
  128.     PrevFile                    * Position to load NUL file
  129.     unmarkblock dropanchor      * Mark file we start in                     |a
  130.     EditFile "NUL" Return Quit  * Load NUL & quit in case already loaded
  131.     gotoblockbeg                * Return to file we started in              |a
  132.     EditFile Return             * Edit NUL file
  133.     #173 CursorLeft             * Place weird char at line beg
  134.     OneWindow HorizontalWindow  * Open one window with NUL file in
  135.                                 *  window 1, starting file in window 2
  136.     EditFile Escape
  137.  FILELOOP:                      * Loop for each file in ring
  138.     FindReplace #173  Return    * Attempt finding weird char in file
  139.       CurrentFileName Return    * Retains current file's name
  140.       "N" Return
  141.  JTrue RINGLIST                 * If char found, must be in NUL file
  142.     PrevWindow                  * Back to NUL file in window 1
  143.     RepeatFind                  * Replace weird character with
  144.                                 *  CurrentFileName from window 1
  145.     AddLine                     * Add another line for another file
  146.     #173 CursorLeft             * Type weird char to find again
  147.     NextWindow NextFile         * Get next file in window 2
  148.  Jump FILELOOP                  * Go initialize FindReplace, or see if
  149.                                 *  we are in NUL file
  150.  RINGLIST:                      * If here, returned back to NUL file
  151.     DelLine                     * Delete entry for NUL file
  152.     BegFile                     * Go to NUL file beg
  153.     OneWindow                   * Close all windows, NUL file loaded
  154.     Pause                       * Pause to select file to edit
  155.     UnmarkBlock MarkLine        * Unmark prompt, mark selected file
  156.     Copy                        * Copy file name to scrap
  157.     EditFile Paste Return       * Edit selected file
  158. *
  159. * 57 bytes Thu  05-16-1991  18:56:42 (JG/TH, @2 for all QCONFIG window opts)
  160. * 57 bytes Sat  06-22-1991  16:40:55 (TH @2, changed #250 to #173)
  161. * 56 bytes Tue  06-25-1991  14:45:47 (TH @2, not quit NUL)
  162. * 59 bytes Fri  08-02-1991  10:16:35 (TH @2, changed ring positions |a)
  163.  
  164. * 
  165. * ----------------------------------------------------------------------
  166. *   @(3)² Select and Load Files From a PickList of All Files In Ring
  167. *        (Emulates PC Magazine's FILECTRL.COM)
  168. * ----------------------------------------------------------------------
  169. *   This macro emulates PC Magazine's  July 1991 FILECTRL.COM written by
  170. *   Michael J. Mefford.  A  window with a list of  all files in the ring
  171. *   allows the user  to select different files  for editing by cursoring
  172. *   down to  the desired  file and  pressing <enter>.   Pressing <enter>
  173. *   again while editing  the selected file returns  the user to the file
  174. *   selection window to select another file. Until this macro is stopped
  175. *   by  pressing  <escape>  three  times, no  other  macro  may  be run.
  176.  
  177.  
  178. @3  MacroBegin
  179.     PrevFile                    * Position to load NUL file
  180.     unmarkblock dropanchor      * Mark file we start in                     |a
  181.     EditFile "NUL" Return Quit  * Load NUL & quit in case already loaded
  182.     gotoblockbeg                * Return to file we started in              |a
  183.     EditFile Return             * Edit NUL file
  184.     #173 CursorLeft             * Place weird char at line beg
  185.     OneWindow                   * Close all windows
  186.     HorizontalWindow            * Open one window with NUL file in
  187.                                 *  window 1, starting file in window 2
  188.     EditFile Escape             * In case QCONFIG "Prompt for filename
  189.                                 *  on open window (Y/N)?" option=[Y]
  190.  FILELOOP:                      * Loop for each file in ring
  191.     FindReplace #173  Return    * Attempt finding weird char in file
  192.       CurrentFileName Return    *  Retains current file's name
  193.                   "N" Return
  194.  JTrue RINGLIST                 * If char found, must be in NUL file
  195.     PrevWindow                  * Back to NUL file in window 1
  196.     RepeatFind                  * Replace weird character with
  197.                                 *  CurrentFileName from window 1
  198.     AddLine                     * Add another line for another file
  199.     #173 CursorLeft             * Type weird char to find again
  200.     NextWindow NextFile         * Get next file in window 2
  201.  Jump FILELOOP                  * Go initialize FindReplace, or see if
  202.                                 *  we are in NUL file
  203.  RINGLIST:                      * If here, go to NUL file
  204.     NEXTFILE                    *                                       |
  205.     prevwindow                  * NUL window
  206.     DelLine                     * Delete entry for NUL file
  207.     BegFile                     * Go to NUL file beg
  208.  SELECT:
  209.     Pause                       * Pause to select file to edit
  210.     UnmarkBlock MarkLine        * Unmark, mark selected file
  211.     Copy                        * Copy selected file name to scrap
  212.     nextwindow
  213.     EditFile Paste Return       * Edit selected file
  214.     zoomwindow
  215.     Pause
  216.  EDIT:
  217.     nextwindow                  * File window
  218.     makectrofscreen
  219.  jump SELECT
  220. *
  221. * 67 bytes Fri  06-21-1991  14:03:40 (TH @3)
  222. * 67 bytes Sat  06-22-1991  13:40:21 (TH @3, changed #250 to #173)
  223. * 68 bytes Sun  06-23-1991  15:33:08 (TH @3 added NextFile)
  224. * 65 bytes Mon  06-24-1991  21:14:14 (TH @3, shortened)
  225. * 68 bytes Fri  08-02-1991  10:24:36 (TH @3, changed ring positions |a)
  226.  
  227.  
  228.  
  229. * 
  230. * ----------------------------------------------------------------------
  231. *   @(4)² Select and Load Files From a DOS "DIR" Picklist, User Inputs
  232. *         File Pattern To Make PickList
  233. *        (Emulates PC Magazine's FILECTRL.COM)
  234. * ----------------------------------------------------------------------
  235. *   This macro emulates PC Magazine's July 1991 FILECTRL.COM written by
  236. *   Michael J. Mefford.  DOS Dir is  used to make a FileList.  A window
  237. *   containing a  list of  all files in  the directory  matching a user
  238. *   determined file pattern  allows the user  to select a  file to load
  239. *   and  edit  by  cursoring  down to  the  desired  file  and pressing
  240. *   <enter>.  Pressing <enter>  again while  editing the  selected file
  241. *   returns the  user to  the file  selection window  to select another
  242. *   file. Until this macro is stopped by pressing <escape> three times,
  243. *   no other macro  may be run.  DIR FileList is sorted alphabetically.
  244.  
  245. @4  Macrobegin
  246.     AltWordSet                  * For all file names
  247.     PrevFile                    *
  248.     EditFile "c:!" Return Quit  * Quit sorted file list if loaded
  249.     OneWindow                   * Close all windows
  250.         Dos "DIR " Pause EndLine ">c:!"     * Make DIR list to temp file
  251.         return return
  252.         EditFile Return                     * Load list
  253.             DelLine 4                       * Delete header info
  254.                                             * May have to change DOSVER >3.3
  255.             EndFile DelLine                 * Delete totals line
  256.             JFalse ABORT                    * Failed?  NO FILES!
  257.             BegFile                         * Back to bof, please.
  258.  LOOPDIR: *------- Remove <DIR> Lines Loop -------*
  259.             Find "<" Return Return          * Find <dir>
  260.             Jfalse ENDDIR                   * If false, no more <dir>'s,
  261.             Delline                         *ELSE Delete <dir> line
  262.             CursorLeft
  263.             Jump LOOPDIR                    * And do 'till done
  264.         ENDDIR:
  265.             Endfile Markcolumn              *                           |
  266.             BegFile                         * BOF for sorting           |
  267.             Sort                            * Sort by name              |
  268.             MarkLine                        * Make a line block         |
  269.             GotoColumn "9" Return           * Go to where "." goes
  270.             GotoBlockend
  271.             MarkColumn                      * Start column block
  272.             PrevPosition                    * Move to top of block
  273.             Fillblock "." Return            * Insert dot's
  274.             UnmarkBlock
  275.         SPACEOUT:
  276.             GotoColumn "13" Return
  277.             MarkColumn
  278.             EndFile
  279.             MarkColumn
  280.             Cut
  281.             BegFile
  282.             FindReplace " " Return          * replace all spaces with
  283.             DelLine Return                  * NOTHING!
  284.             "NG" Return                     * No prompting, just do it.
  285.             GotoColumn "13" Return
  286.             Paste
  287.             UnmarkBlock
  288.  ABORT:
  289.     BegFile
  290.     HorizontalWindow            * Open one window                       |
  291.     EditFile Escape             * In case QCONFIG "Prompt for filename  |
  292.                                 *  on open window (Y/N)?" option=[Y]    |
  293.     PrevWindow                  * Window 1                              |
  294.     EditFile Return             * Load file list window 1
  295.  SELECT:
  296.     Pause                       * Pause to select file to edit
  297.     UnmarkBlock
  298.     BegLine
  299.     MarkWord
  300.     Copy                        * Copy selected file name to scrap
  301.     NextWindow
  302.     EditFile Paste Return       * Edit selected file
  303.     ZoomWindow
  304.     Pause                       * Pause to edit file, <enter> to select
  305.                                 *  another file
  306.  EDIT:
  307.     NextWindow                  * Select window 1
  308.     MakeCtrofScreen
  309.  jump SELECT
  310. *
  311. * 142 bytes Sun  06-23-1991  12:49:31 (TH @3)
  312. * 142 bytes Sun  06-23-1991  15:34:15 (TH @3, added PrevFile, rmvd. Zoom)
  313. * 139 bytes Mon  06-24-1991  16:52:14 (TH @3, added sort)
  314. * 133 bytes Mon  06-24-1991  21:13:40 (TH @3, removed extra c:!)
  315.  
  316. * 
  317. * ----------------------------------------------------------------------
  318. *   @(5)² Select and Load Files From a PickList Made Using Directory
  319. *         Extended, DX.EXE, User Selects Desired File Extension and
  320. *         Sort Options From a Pre-Made File "FILE.SRT" To Make PickList
  321. *        (Emulates PC Magazine's FILECTRL.COM)
  322. * ----------------------------------------------------------------------
  323. *   This macro emulates PC Magazine's July 1991 FILECTRL.COM written by
  324. *   Michael J. Mefford.  DX.EXE  Directory Extended  is used  to make a
  325. *   File List sorted by Name, Date or Extension. DX.EXE must be located
  326. *   in  the  path. A  window  containing a  list  of all  files  in the
  327. *   directory matching a  user determined file  pattern allows the user
  328. *   to select a file to load and  edit by cursoring down to the desired
  329. *   file and pressing <enter>. Pressing <enter> again while editing the
  330. *   selected  file returns  the user  to the  file selection  window to
  331. *   select  another  file.  Until this  macro  is  stopped  by pressing
  332. *   <escape> three times, no other macro may be run.
  333.  
  334. *   DX.EXE is contained in AMAC-PRG.ZIP,  or see  AMACnn.ZIP/FILEnn.ZIP
  335. *   for other download sources.
  336.  
  337. *   Before running this macro,  *make*  the following two files if they
  338. *   are not available:
  339.  
  340. *   ┌───-──────────────── FILE.SRT ───────────────────────────────────────
  341. *   │ qm     d-    date  - Cursor down to select extension (col 1) and
  342. *   │ bak    d-    date    sorting option (col 2), then [enter]
  343. *   │ bat    d-    date           d-  descending date
  344. *   │ *      d-    date           n-  descending name
  345. *   │ qm     n     name           a+  ascending  extension
  346. *   │ bak    n     name  - Must have Directory Extended DX.EXE in path
  347. *   │ bat    n     name  - Add/Delete extensions and sorting options
  348. *   │ *      n     name  - Extension "*" selects all files in directory
  349. *   │ *      ed-   ext/date
  350. *   │ *      en    ext/name
  351. *   └─────────────────────────────────────────────────────────────────────
  352.  
  353. *   ┌─────────────────── PICK2.BAT ───────────────────
  354. *   │ @echo PICK2.BAT                    June 23, 1991
  355. *   │ @DX.EXE %1 //SING/HE:0/ST:1/AT:d-/SO:%2/Out:>c:!
  356. *   └─────────────────────────────────────────────────
  357.  
  358. @5  Macrobegin
  359.     AltWordSet                  * For all file names
  360.     EditFile "FILE.SRT" Return  * Load sort list
  361.     Pause                       * Select sort type
  362.     MarkLine Copy               * Copy line to scrap
  363.     Quit                        * Quit FILE.SRT
  364.     DOS "PICK2" " ."            * Make/sort file list                   |
  365.     Paste Return Return
  366.     PrevFile                    * Position to load DIR list
  367.     EditFile "c:!" Return Quit  * Quit sorted file list if loaded
  368.     OneWindow                   * Close all windows
  369.     HorizontalWindow            * Open one window
  370.     EditFile Escape
  371.     PrevWindow                  * Window 1
  372.     EditFile Return             * Load sorted file list window 1
  373.  SELECT:
  374.     Pause                       * Pause to select file to edit
  375.     UnmarkBlock
  376.     BegLine WordRight MarkWord
  377.     Copy                        * Copy selected file name to scrap
  378.     NextWindow
  379.     EditFile Paste Return       * Edit selected file
  380.     ZoomWindow
  381.     Pause
  382.  EDIT:
  383.     NextWindow                  * Select window 1
  384.     MakeCtrofScreen
  385.  jump SELECT
  386. *
  387. * 91 bytes Sun  06-23-1991  16:05:13 (TH @5, removed Zoom, corrected FILE.SRT)
  388. * 83 bytes Mon  06-24-1991  21:14:31 (TH @5, moved window open down)
  389. * 79 bytes Wed  06-26-1991  18:25:31 (TH @5, changed batch file to PICK2.BAT)
  390.  
  391. * 
  392. * ----------------------------------------------------------------------
  393. *   @(6)² Select and Load Files From a PickList Made Using Directory
  394. *         Extended, DX.EXE, User Inputs File Pattern and Sorting Options
  395. *         To Make PickList
  396. *        (Emulates PC Magazine's FILECTRL.COM)
  397. * ----------------------------------------------------------------------
  398. *   This macro emulates PC Magazine's July 1991 FILECTRL.COM written by
  399. *   Michael J. Mefford. User  specifies file pattern and sorting option
  400. *   at the DOS prompt. DX.EXE Directory Extended is used to make a file
  401. *   PickList  sorted by  Name, Date or  Extension. File  DX.EXE must be
  402. *   located in the path. A window containing a PickList of all files in
  403. *   the  directory matching  a user  specified file  pattern allows the
  404. *   user to  select a file  to load and  edit by cursoring  down to the
  405. *   desired  file and  pressing <enter>.  Pressing <enter>  again while
  406. *   editing the  selected file returns  the user to  the file selection
  407. *   window to  select another  file.   Until this  macro is  stopped by
  408. *   pressing   <escape>   three  times,  no  other  macro  may  be run.
  409.  
  410. *   DX.EXE is contained in AMAC-PRG.ZIP,  or see  AMACnn.ZIP/FILEnn.ZIP
  411. *   for other download sources.
  412.  
  413. *   SYNTAX:   [ FileName(s) ]  [ File Sort Options (esda) ]  <enter>
  414.  
  415. *   Sort option without a value  sorts files by name and then extension
  416. *   in  ascending order.  Sorting criteria are:  "N" for  name, "E" for
  417. *   extension,  "S"  for size,  "D" for  date/time, "A"  for attribute.
  418. *   Specifying  a sorting  option  with  with a  "+"  suffix  indicates
  419. *   ascending   order;  specifying  a  "-" suffix indicates  descending
  420. *   order.
  421.  
  422. *   Sorting Examples:
  423. *   -----------------
  424. *         [filename(s)] ne    => sort by name and extension
  425. *         [filename(s)] e-n-  => sort files descending by extension
  426. *                                first and then by                              descending name
  427. *         [filename(s)] snd-  => sort files by ascending size, ascending
  428. *                                name, and then descending date
  429.  
  430. *   "C*.*  s-" sorts files in the current directory beginning with the
  431. *   letter "C" by size, largest first. A space must be included between
  432. *   name/sort option!
  433.  
  434. *   Before running this macro,  *make*  the following batch file if it is
  435. *   not available:
  436.  
  437. *   ┌─────────────────── PICK2.BAT ───────────────────
  438. *   │ @echo PICK2.BAT                    June 23, 1991
  439. *   │ @DX.EXE %1 //SING/HE:0/ST:1/AT:d-/SO:%2/Out:>c:!
  440. *   └─────────────────────────────────────────────────
  441.  
  442. @6  Macrobegin
  443.     AltWordSet                  * For all file names
  444.     EditFile "c:!" Return Quit  * Quit PickList if loaded
  445.     DOS "PICK2 "                * Make PickList
  446.     Pause return return
  447.     OneWindow                   * Close all windows
  448.     PrevFile                    * Position to load DIR list
  449.     HorizontalWindow            * Open one window
  450.     EditFile Escape
  451.     PrevWindow                  * Window 1
  452.     EditFile "c:!" return       * Load PickList window 1
  453.  SELECT:
  454.     Pause                       * Pause to select file to edit
  455.     UnmarkBlock
  456.     BegLine WordRight MarkWord
  457.     Copy                        * Copy selected file name to scrap
  458.     NextWindow
  459.     EditFile Paste Return       * Edit selected file
  460.     ZoomWindow
  461.     Pause
  462.  EDIT:
  463.     NextWindow                  * Return to PickList for another selection
  464.     MakeCtrofScreen
  465.  jump SELECT
  466. *
  467. * 61 bytes Mon  06-24-1991  13:47:54 (@6, TH)
  468.  
  469. * 
  470. * ----------------------------------------------------------------------
  471. *   @(8)² Load While Editing All Files In Pre-Made List of Files,
  472. *         Modification of @1
  473. *        (Emulate PC Magazine's FILECTRL.COM),
  474. * ----------------------------------------------------------------------
  475. @8  MacroBegin
  476.     onewindow
  477.     prevfile
  478.     horizontalwindow
  479.     editfile escape
  480.     prevwindow
  481.     EditFile "NUL" Return       * Edit NUL to load all files in ring
  482.     EndFile BegLine             * start at last line
  483.   REPEAT:
  484.     MarkLine Copy               * grab this name
  485.     EditFile                    * get ready to load
  486.     CurrentFilename " "         * to force return *here*
  487.     Paste Return                * paste file name & do it!
  488.     CursorUp                    * more lines above?
  489.     JTrue REPEAT                * if yes, repeat.
  490.  SELECT:
  491.     Pause                       * Pause to select file to edit
  492.     UnmarkBlock MarkLine        * Unmark, mark selected file
  493.     Copy                        * Copy selected file name to scrap
  494.     nextwindow                  * Selected file
  495.     EditFile Paste Return       * Edit selected file
  496.     zoomwindow                  * Zoom until <enter>
  497.     Pause                       * <enter> to select another file
  498.  EDIT:
  499.     nextwindow                  * Selected window
  500.     makectrofscreen
  501.  jump SELECT                    * Loop again
  502. *
  503. * 48 bytes Tue  06-25-1991  14:36:14 (TH @8)
  504. * 47 bytes Wed  06-26-1991  13:51:29 (TH @8, removed unnecessary unmarkblock)
  505.  
  506. * 
  507. * ----------------------------------------------------------------------
  508. *   @(9)² Begin or Continue Emulation of PC Magazine's FILECTRL.COM
  509. *         After Macros @1 to @7 Have Been Stopped
  510. * ----------------------------------------------------------------------
  511. @9  macrobegin
  512.     onewindow horizontalwindow
  513.     editfile escape
  514.     prevfile prevwindow
  515.     editfile "NUL" return
  516.  SELECT:
  517.     Pause                       * Pause to select file to edit
  518.     MarkLine Copy               * Copy selected file name to scrap
  519.     nextwindow
  520.     EditFile Paste Return       * Edit selected file
  521.     zoomwindow
  522.     Pause
  523.  EDIT:
  524.     nextwindow                  * File window
  525.     makectrofscreen
  526.  jump SELECT
  527. *
  528. * 31 bytes Thu  05-09-1991  16:25:46 (TH @0, QLST14.qm)
  529. * 32 bytes Mon  06-24-1991  13:30:07 (TH @9)
  530.  
  531. * 
  532. * ----------------------------------------------------------------------
  533. * @(f1)  Load Previously Saved List of Files Made With @f2
  534. * ----------------------------------------------------------------------
  535. * This macro loads the list of files previously saved with @2.  This is
  536. * a modification to a macro written by Kyle Watkins of SemWare to load
  537. * a list of files and macro @2 above.
  538.  
  539. * If this macro is the first macro in a file named 'ring@f1.qm', the
  540. * following batch file, 'ring.bat' will load from the command line the
  541. * list of files previously saved with @f2, with the file you were
  542. * editing when @f2 was invoked, loaded:
  543.  
  544. *                   q.exe  qstat  /Ering@f1.mac
  545.  
  546. * See ring@f1.qm for macro.
  547.  
  548.  
  549.  
  550. * 
  551. * 
  552. * ----------------------------------------------------------------------
  553. *  @(f2)  Save List of Files In Ring
  554. * ----------------------------------------------------------------------
  555. * This macro saves a list of files loaded in the ring.  If files have
  556. * been changed, it will prompt you with "Save Changes (Y/N)?".  This
  557. * macro is based on a technique originally written by Richard Blackburn
  558. * of SemWare and modified by me to use windows.
  559.  
  560. @f2 MacroBegin
  561.     PrevFile                        * Position to load NUL file
  562.     unmarkblock dropanchor          * Mark file we start in
  563.     EditFile "NUL" Return Quit      * Load NUL & quit in case already loaded
  564.     gotoblockbeg                    * Return to file we started in
  565.     EditFile Return                 * Edit NUL file
  566.     #173 CursorLeft                 * Place weird char at line beg
  567.     OneWindow HorizontalWindow      * Open one window with NUL file in
  568.                                     *  window 1, starting file in window 2
  569.     EditFile Escape
  570.  FILELOOP:                          * Loop for each file in ring
  571.     FindReplace #173  Return        * Attempt finding weird char in file
  572.       CurrentFileName Return        * Retains current file's name
  573.       "N" Return
  574.  JTrue RINGLIST                     * If char found, must be in NUL file
  575.     PrevWindow                      * Back to NUL file in window 1
  576.     RepeatFind                      * Replace weird character with
  577.                                     *  CurrentFileName from window 1
  578.     AddLine                         * Add another line for another file
  579.     #173 CursorLeft                 * Type weird char to find again
  580.     NextWindow NextFile             * Get next file in window 2
  581.  Jump FILELOOP                      * Go initialize FindReplace, or see if
  582.                                     *  we are in NUL file
  583.  RINGLIST:                          * If here, returned back to NUL file
  584.     DelLine                         * Delete entry for NUL file
  585.     BegFile                         * Go to NUL file beg
  586.     OneWindow                       * Close all windows, NUL file loaded
  587.     unmarkblock                     * Unmark starting mark
  588.     writeblock "qstat" return       * Save list of files in ring
  589.     "o"                             * Overwrite option in case list exists
  590.     quit                            * Quit NUL
  591.     gexit                           * Exit with prompt to save changed files
  592. *
  593. * 69 bytes Fri  08-02-1991  11:50:48 (TH @f2)
  594.  
  595. * ----------------------------------------------------------------------
  596. *  @(F6)  Makes a DIR List of Filenames in Conventional "8.3" Format,
  597. *                 NO SPACES, with Date and Time, like this:
  598. *                 FILE25.QM       64795   6-23-91   4:12a
  599. * ----------------------------------------------------------------------
  600.  
  601. *  DOS DIR  command produces a  list of files  with filenames containing
  602. *  space and  no dot  between the file  name prefix  and extension. This
  603. *  macro modifies  my earlier  macro in AMACnn.ZIP(v38)/FILEnn.ZIP(v24),
  604. *  based on a macro written by Tim Farley, to produce a list of files in
  605. *  conventional "8.3" format.  This macro is  faster and "smoother" than
  606. *  the previous versions.  Removing the three lines near then end of the
  607. *  macro produces a  file list without the date and time. Wild cards are    |
  608. *  OK.
  609.  
  610. *  DIR <enter> gives this...
  611. *---------------------------
  612. *  Volume in drive E is Seagate 1
  613. *  Directory of  E:\UP
  614. *
  615. * .            <DIR>
  616. * ..           <DIR>
  617. * TEMP         <DIR>      6-23-91   9:47a
  618. *     .
  619. * FILE25   QM     64795   6-23-91   4:12a
  620. *     .
  621. *       347 File(s)   4513792 bytes free
  622.  
  623. *  @F6 <enter> gives this...
  624. *---------------------------
  625. *     .
  626. * FILE25.QM       64795   6-23-91   4:12a
  627. *     .
  628.  
  629. @F6     macrobegin
  630.         AltWordSet                      * For all file names
  631.         Dos "DIR "                      * DOS DIR listing
  632.         Pause                           * Pause for file pattern
  633.         EndLine ">c:!" return return
  634.         EditFile "c:!" Return Quit      * Quit temp file if loaded
  635.         editfile return                 * Load DIR list
  636.         DelLine 4                       * Delete header info
  637.                                         * May have to change for DOSVER >3.3
  638.         EndFile DelLine                 * Delete totals line
  639.         JFalse ABORT                    * Failed?  NO FILES!
  640.         BegFile                         * Back to bof, please.
  641.  LOOPDIR: *------- Remove <DIR> Lines Loop -------*
  642.         Find "<" Return DelLine Return  * Find <dir>
  643.         Jfalse ENDDIR                   * If false, no more <dir>'s,
  644.         Delline                         *ELSE Delete <dir> line
  645.         CursorLeft
  646.         Jump LOOPDIR                    * And do 'till done
  647.  ENDDIR:
  648.         Endfile Markcolumn              *                           |
  649.         BegFile                         * BOF for sorting           |
  650.         Sort                            * Sort by name              |
  651.         MarkLine                        * Make a line block         |
  652.         Gotocolumn "9" return           * Go to where "." goes
  653.         gotoblockend
  654.         markcolumn                      * Start column block
  655.         prevposition                    * Move to top of block
  656.         Fillblock "." return            * Insert dot's
  657.         unmarkblock
  658.  SPACEOUT:
  659.         gotocolumn "13" return
  660.         markcolumn
  661.         endfile
  662.         markcolumn
  663.         cut                             * Cut Date and Time to scrap
  664.         BegFile
  665.         FindReplace " " Return          * Replace all spaces with
  666.         DelLine Return                  * NOTHING!
  667.         "NG" Return                     * No prompting, just do it.
  668. * --------- Remove next three lines to remove Date and Time ---------*
  669.         gotocolumn "13" return
  670.         paste                           * Paste Date and Time back
  671.         unmarkblock
  672. * -------------------------------------------------------------------*
  673.  ABORT:
  674.         defaultwordset
  675.         begfile
  676. *
  677. * 110 bytes Sun  06-23-1991  10:20:14 (TH @f6)
  678. * 111 bytes Tue  06-25-1991  14:57:15 (TH @f6, | sort names)
  679.  
  680. * 
  681. * ----------------------------------------------------------------------
  682. * @(h)  Jump From Index Line To (Locate) Macro or Item In Document Below
  683. * ----------------------------------------------------------------------
  684. *        Alt_h can be used to quickly jump from Index Line to the desired
  685. *        item or macro in the document below:
  686. *        1. Press Alt and h at the same time. Line 1 is marked to
  687. *           highlight. Cursor down to desired line in Index.
  688. *        2. Press Enter. The macro then locates and jumps to the item
  689. *           selected on the cursor line in the document below.
  690.  
  691. *   See BOOKnn.Qm and JMPPOSnn.QM in AMACnn.ZIP for more discussion about
  692. *   using bookmarks and positions markers ( ) to jump to positions in
  693. *   files.
  694.  
  695. @h macrobegin
  696.         unmarkblock                     * Unmark any marked blocks
  697.         defaultwordset                  * In case altwordset on
  698.         begfile
  699.         endpara                         * Move to end of Index
  700.         markline                        * Mark it
  701.         begfile                         * Move to bof
  702.         find "(" return "L" return      * Locate first Index selection line
  703.     jfalse NOMARK
  704.         makectrofscreen                 * Show top of file
  705.         begfile                         * Move back to bof
  706.         unmarkblock markline markline   * And highlight line 1
  707.         prevposition                    * Move back to first selection line
  708.         begline                         * Cursor in col 1
  709.         pause                           * Pause for Index selection
  710.         wordright markword              * Mark first word on line
  711.         copy                            * Copy word to scrap
  712.         endpara                         * Go to end of Index
  713.         find "(" paste ")"
  714.         return "I" return               * Find first marked word in doc
  715.     jfalse NOMARK
  716.         begline                         * If mark found go to begline
  717.         maketopofscreen scrollup        * Cursor on line 2                |a
  718.     jump END
  719.     NOMARK:
  720.         begfile                         * If no mark found go to begfile
  721.     END:
  722. *
  723. * 52 bytes Wed  07-31-1991  14:43:31 (TH @h, @4 in BOOKnn.QM)
  724.  
  725. * 
  726. * ----------------------------------------------------------------------
  727. * @(r) Reset to DefaultWordSet After Macros Complete
  728. * ----------------------------------------------------------------------
  729. @r  defaultwordset
  730.  
  731. * 
  732. * ----------------------------------------------------------------------
  733. *   (NEWKEY) macro to stop macro at pause, close all windows, and set
  734. *    defaultwordset:
  735. * ----------------------------------------------------------------------
  736. *   <esc><esc><esc><ctrlo>o< key_assigned_to_defaultwordset >
  737.  
  738. *   The above NEWKEY macro simulates a QEdit macro:
  739. *                           escape escape escape
  740. *                           onewindow
  741. *                           defaultwordset
  742.  
  743. *                          (Version) History
  744. *   =====================================================================
  745. *   1.2  -   Changed ring positions in @2 and @3.                       8/2/91
  746. *        -   Added @f1 and @f2 to save and restore ring files.
  747. *        -   Changed @f key to @r.
  748. *        -   Macros @1, @7 and @f1 are now only in subfiles
  749. *            for use to autoexecute at start up.
  750. *        -   Added latest version of @h.
  751. *   1.2a -   Corrected @7 subfile name in RINGnn.index.                 8/6/91
  752. *        -   Added second copy of @7 to RFRMnn.QM.                      8/6/91
  753. *   1.2b -   Modified ring@1.qm and ring@7.qm.                         2/17/92
  754. *        -   Added ring@f2.qm.                                         2/17/92
  755. *   1.3a -   Removed ring@1/7/0/f2(ring@f2.qm).  Moved to QLSTnn.QM.    5/7/92
  756. *        -   In Amac43.zip.                                            5/27/92
  757. *   1.3b -   Added ( ) to Index line 1 for bok001.qm macros.           5/30/92
  758. *
  759. *
  760. *--eof
  761.